//package com.xuelang.config;
//
//import com.xuelang.component.AuthorizationAccessFilter;
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import jakarta.servlet.DispatcherType;
//import jakarta.servlet.Filter;
//import java.util.EnumSet;
//
///**
// * Web配置类
// *
// * @author xiwen.zxg
// * @since 2024/5/17
// */
//@Configuration
//public class WebConfig implements WebMvcConfigurer {
//
//    @Bean
//    public FilterRegistrationBean<Filter> accessFilterBean() {
//        FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>();
//        filterRegistrationBean.setFilter(accessFilter());
//        filterRegistrationBean.addUrlPatterns("*");
//        filterRegistrationBean.setOrder(1);
//        filterRegistrationBean.setName("accessFilter");
//        filterRegistrationBean.setDispatcherTypes(EnumSet.allOf(DispatcherType.class));
//        return filterRegistrationBean;
//    }
//
//    @Bean
//    public AuthorizationAccessFilter accessFilter() {
//        return new AuthorizationAccessFilter();
//    }
//
//
//}
